// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import VueQArt from 'vue-qart'
import ElementUI from "element-ui"
import 'element-ui/lib/theme-default/index.css'
import VueRouter from "vue-router"
import axios from "axios"

import index from "./components/index/index.vue"                                  //首页－
import coupons from "./components/coupons/coupons.vue"
import customer from "./components/customer/customer.vue"
import evaluate from "./components/evaluate/evaluate.vue"
import goods from "./components/goods/goods.vue"                                  //订单－
  import allGoods from"./components/goods/allGoods/allGoods.vue"            //全部
  import goodsSelf from"./components/goods/self/self.vue"                   //自营
  import goodsOTA from"./components/goods/OTA/OTA.vue"                      //OTA
  import yuyue from"./components/goods/yuyue/yuyue.vue"                     //预约
  import goodsBack from"./components/goods/back/back.vue"                   //退款
import merchants from "./components/merchants/merchants.vue"                      //商家－
  import merchantsSJ from "./components/merchants/SJ/SJ.vue"                //商家
  import merchantsHotel from "./components/merchants/hotel/hotel.vue"       //酒店
  import merchantsDrama from "./components/merchants/drama/drama.vue"  //剧场
import operate from "./components/operate/operate.vue"
import product from "./components/product/product.vue"                             //产品－
  import scenicSpot from "./components/product/scenicSpot/scenicSpot.vue"    //景区
  import opera from "./components/product/opera/opera.vue"                   //剧类
  import hotel from "./components/product/hotel/hotel.vue"                   //酒店
  import SC from "./components/product/SC/shangchang.vue"                   //商场类
  import food from "./components/product/food/food.vue"                     //美食
  import productPackage from "./components/product/package/package.vue"     //套餐
  import card from "./components/product/card/card.vue"                     //卡券
  import productOTA from "./components/product/OTA/OTA.vue"                 //OTA
  import self from "./components/product/self/self.vue"                     //自营
  import group from "./components/product/group/group.vue"                     //自营
  import study from "./components/product/study/study.vue"                     //自营
import statistical from "./components/statistical/statistical.vue"                    //数据分析－
  import statisticalCustomer from "./components/statistical/customer/customer.vue"  //客户分析
  import statisticalDeal from "./components/statistical/deal/deal.vue"              //交易分析
    import statisticalWoter from "./components/statistical/deal/dealWoter.vue"       //交易流水
    import statisticalBack from "./components/statistical/deal/dealBack.vue"       //退款分析
    import statisticalDealProduct from "./components/statistical/deal/dealProduct.vue"       //产品分析
    import statisticalVerify from "./components/statistical/deal/verify.vue"       //核销分析
  import statisticalEvaluate from "./components/statistical/evaluate/evaluate.vue"  //评价分析
    import statisticalEvaluateProduct from "./components/statistical/evaluate/product.vue"
    import statisticalEvaluateMerchants from "./components/statistical/evaluate/merchants.vue"
  import statisticalProduct from "./components/statistical/product/product.vue"     //产品分析
import activity from "./components/activity/activity.vue"                    //营销
  import activityGift from "./components/activity/gift/gift.vue"             //拼团送礼
    import activityGiftGive from "./components/activity/gift/give.vue"
    import activityGiftConfig from "./components/activity/gift/config.vue"
    import activityGiftHistory from "./components/activity/gift/history.vue"
  import activityExtraction from "./components/activity/extraction/extraction.vue"  //抽奖
  import activityIntegral from "./components/activity/integral/integral.vue"  //积分
import setting from "./components/setting/setting.vue"                      //设置－
  import setBack from "./components/setting/backSet/backSet.vue"            //退款设置
  import setPlace from "./components/setting/place/place.vue"               //售卖渠道


import {store} from "./store/store.js"

Vue.use(ElementUI);
Vue.use(VueRouter);
Vue.config.productionTip = false

const routes=[{path:"/",redirect:"/index"},
              {path:'/index',component:index},
              {path:'/coupons',component:coupons},
              {path:'/customer',component:customer},
              {path:'/evaluate',component:evaluate},
              {path:'/goods',component:goods,
              children: [{path: 'allGoods',  component: allGoods},
                         {path: 'goodsSelf',  component: goodsSelf},
                         {path: 'goodsBack',  component: goodsBack},
                         {path: 'yuyue',component: yuyue},
                         {path: 'goodsOTA',component: goodsOTA}
            ]},
              {path:'/merchants',component:merchants,
               children:[ {path: 'merchantsSJ',  component: merchantsSJ},
                          {path: 'merchantsHotel',  component: merchantsHotel},
                          {path: 'merchantsDrama',  component: merchantsDrama}]},
              {path:'/operate',component:operate},
              {path:'/product',component:product,
               children:[ {path: 'scenicSpot',  component: scenicSpot},
                          {path: 'opera',component: opera},
                          {path: 'hotel',component: hotel},
                          {path: 'SC',component: SC},
                          {path: 'food',component: food},
                          {path: 'productPackage',component: productPackage},
                          {path: 'card',component: card},
                          {path: 'productOTA',component: productOTA},
                          {path: 'self',component: self},
                          {path: 'group',component: group},
                          {path: 'study',component: study}]},
              {path:'/statistical',component:statistical,
              children:[ {path: 'customer',  component: statisticalCustomer},
                         {path: 'deal',component: statisticalDeal,
                           children:[ {path: 'woter',  component: statisticalWoter},
                                      {path: 'back',component: statisticalBack},
                                      {path: 'product',component: statisticalDealProduct},
                                      {path: 'verify',component: statisticalVerify}]},
                         {path: 'evaluate',component: statisticalEvaluate,
                           children:[ {path: 'product',  component: statisticalEvaluateProduct},
                                      {path: 'merchants',component: statisticalEvaluateMerchants}]},
                         {path: 'product',component: statisticalProduct}]},
              {path:'/activity',component:activity,
              children:[ {path: 'gift',  component: activityGift,
                         children:[{path: 'config',component: activityGiftConfig},
                           {path: 'give',component: activityGiftGive},
                           {path: 'history',component: activityGiftHistory}]},
                         {path: 'extraction',component: activityExtraction},
                         {path: 'integral',component: activityIntegral}]
            },
              {path:'/setting',component:setting,
               children:[ {path: 'setBack',  component: setBack},
                          {path: 'setPlace',component: setPlace}]}
              ];

var router =new VueRouter({
    routes
});
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  template: '<App/>',
  components: { App,VueQArt }
})
